﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WindowsFormsApplication3;

namespace bsy
{
    public partial class sy_customer_recharge_Form : Form
    {

        private string recharge;

        public string Recharge
        {
            get { return recharge; }
            set { recharge = value; }
        }

      
        public sy_customer_recharge_Form()
        {
            InitializeComponent();
        
        
        }
        //判断你是否为浮点型
        public Boolean isFloat(string f)
        {
            try
            {
                float i = float.Parse(f);
                return true;
            }
            catch
            {
                return false;
            }
        }
        //按确定充值按钮（挂单）
        private void customer_recharge_comfire_Click(object sender, EventArgs e)
        {

            if ("".Equals(recharge_money.Text.ToString().Trim()))
            {
                error_msg.Text = "金额不能为空";
                return;
            }
            else if (!isFloat(recharge_money.Text.ToString().Trim()))
            {

                error_msg.Text = "请输入正确的数据格式";
                return;
            }else
            {
                error_msg.Text = "";
            }

            recharge = recharge_money.Text.ToString();
            this.DialogResult = DialogResult.OK;
           
        }

       


    
    }
}
